package com.xkdx.caipiao.presistence.tixian;

import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.xkdx.caipiao.module.network.AbsModule;

public class TixianModule extends AbsModule {
	public boolean isDefaultSuccess = false;
	public boolean isCommitSuccess = false;
	public String messageDefault = "";
	public String messageCommit = "";

	@Override
	public void parseData() throws Exception {
		try {
			backJson = (JSONArray) result;
			for (int i = 0; i < backJson.size(); i++) {
				jsonObj = (JSONObject) backJson.get(i);
				String sortOfAct = jsonObj.getString("Act");
				if (sortOfAct.equals("SetDefault")) {
					if (jsonObj.getString("Code").equals("0000")) {
						isDefaultSuccess = true;
					} else {
						isDefaultSuccess = false;
						messageDefault = jsonObj.getString("Message");
					}
				} else if (sortOfAct.equals("CashRequest")) {
					if (jsonObj.getString("Code").equals("0000")) {
						isCommitSuccess = true;
					} else {
						isCommitSuccess = false;
						messageCommit = jsonObj.getString("Message");
					}
				}

			}
		} catch (Exception e) {
			
			throw e;
		}

	}

}
